import $http from '@/utils/request.js'
// 饮料机
export const beverageMachineAPI = (params) => {
  return $http({
    url: '/api/vm-service/skuClass/search',
    params
  })
}
// /api/vm-service/skuClass
// 新增
export const addListAPI = (data) => {
  return $http({
    url: '/api/vm-service/skuClass',
    method: 'POST',
    data
  })
}
// 修改
export const editListAPI = (id, data) => {
  return $http({
    url: `/api/vm-service/skuClass/${id}`,
    method: 'PUT',
    data
  })
}
// 删除
export const deleListAPI = (id) => {
  return $http({
    url: `/api/vm-service/skuClass/${id}`,
    method: 'DELETE'
  })
}
// 商品管理页面----------------
export const merchandiseManagementAPI = (params) => {
  return $http({
    url: '/api/vm-service/sku/search',
    params
  })
}
// 商品类型
export const productTypeAPI = () => {
  return $http({
    url: '/api/vm-service/skuClass/search?pageIndex=1&pageSize=100000'
  })
}
// 添加
export const addProducts = (data) => {
  return $http({
    url: '/api/vm-service/sku',
    method: 'POST',
    data
  })
}
// 图片上传
export const imgsAPI = () => {
  return $http({
    url: '/api/vm-service/sku/fileUpload',
    method: 'POST'

  })
}
// /api/vm-service/sku/1
export const editAPI = (id, data) => {
  return $http({
    url: `/api/vm-service/sku/${id}`,
    method: 'PUT',
    data
  })
}

